1. Field of the Invention
The present invention relates generally to a method and apparatus for resource arbitration in electronic systems. More specifically, the present invention relates to a method and apparatus for resolving requests between a plurality of queues based on a number of data packets currently enqueued at each queue.
2. Description of the Prior Art
In many different types of electronic systems, multiple agents including hardware units and software modules compete for access to a single resource such as an interconnect bus, memory unit, or output buffer. For example, in computer systems, multiple agents may simultaneously request access to a memory device. As another example, in network switches, multiple agents may simultaneously request access to a routing resource such as a packet routing address look up table or a network output port. In such systems, agents generally issue resource requests to gain exclusive access to the resource for a period of time. Such systems require means for arbitrating between the requests in order to determine which agent gains control of the resource when two or more agents are simultaneously competing for control of the resource.
Typically, electronic systems include an arbitration system for arbitrating between requests received from the multiple requesting agents, and for granting access to a selected one of the requesting agents. After one of the requesting agents gains access to the resource, it performs a particular operation and relinquishes access to the resource upon completion of the particular operation or expiration of the predetermined time period, whichever occurs first. However, as the number of competing agents requiring access to a resource increases, the performance of a typical arbitration system decreases, and latencies are incurred.
There are a number common types of arbitration schemes used for implementing arbitration systems. In accordance with one types of arbitration scheme, called "fixed priority arbitration", resource access is granted to a requesting agent having a highest priority. Thus, the highest priority agent is guaranteed to experience very low latency. However, the fixed priority arbitration scheme "starves" requesting agents assigned with a low priority when an agent assigned with the highest priority is frequently requesting access to the resource.
Another type of arbitration scheme, referred to as weighted round robin arbitration, is widely used for managing multiple priority queues. As an example, consider that four queues designated queue_3, queue_2, queue_1, and queue_0 having different priorities are attributed initial weight values of 4, 3, 2, and 1 respectively. In this case, the queues will be considered in the sequence queue_3, queue_2, queue_1, queue_0, queue_3, queue_2, queue_1, queue_3, queue_2, queue_3. Therefore, queue_3 has four tries for access to the resource, queue_2 has three tries, queue_2 has two tries, and queue_1 has a try. In varying prior art weighted round robin arbitration methods, the initial weight values are programmed by software or fixed after power up of the arbiter system.
What is needed is an arbiter system which provides enhanced performance characteristics, and therefore minimal arbitration latency in resolving requests between a plurality of N queues requiring access to a resource.
What is also needed is an arbiter system which provides fast and fair arbitration for resolving requests between a plurality of N queues requiring access to a resource.
Further needed is an arbiter system which provides improved load balancing in resolving requests between a plurality of N queues requiring access to a resource.